package top.mengchaob.deploy.util;

import com.jcraft.jsch.SftpProgressMonitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @title：
 * @author: mengchaob
 * @date: 2021年04月27日 13:09
 * @description:
 */
public class SftpProgressMonitorImpl implements SftpProgressMonitor {
    Logger logger = LoggerFactory.getLogger(SftpProgressMonitorImpl.class);
    private long transfered;
    @Override
    public void init(int i, String s, String s1, long l) {
        logger.debug("开始传输...");

    }

    @Override
    public boolean count(long l) {
        transfered = transfered + l;
        logger.debug("已经传输:======= " + transfered + " bytes");
        return true;
    }

    @Override
    public void end() {
        logger.debug("传输结束");
    }
}
